package com.eureka.main;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by qiao on 2017/7/23.
 */
@SpringBootApplication
@EnableEurekaClient
@RestController
public class EuClientApp {
    public static void main(String[] args) {
        SpringApplication.run(EuClientApp.class, args);
    }

    @Value("${server.port}") String port;

    @RequestMapping("hi")
    @ResponseBody
    public String home(@RequestParam String name){
        return "hi " + name + ", i am from port : " + port;
    }

}
